package alipay.openplatform.edu.campus.jiuye.common.exception;

import java.util.HashMap;
import java.util.Map;


/**
 * 交易异常
 * Created by zhangyang on 7/26/16.
 */
public class BusinessRuntimeException extends RuntimeException{
    private String code=null;
    private String message=null;
    private Map<String,Object> params=new HashMap<>();


    public BusinessRuntimeException(String code, String message,Map<String,Object> params){
        this.code=code;
        this.message=message;
        this.params=params;
    }

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public void addParams(String name,String value){
        this.params.put(name,value);
    }
}
